function make_count_down()
{
	$('.newoffer').countDown(
	{
		startNumber: 0,
		endNumber:0
	});
}

$(function()
{


	// Slide effects for projects categories
	$.fn.slideLeftShow = function( speed, callback ) { this.animate( { width: "show", paddingLeft: "show", paddingRight: "show", marginLeft: "show", marginRight: "show" }, speed, callback ); }
	$.fn.slideLeftHide = function( speed, callback ) { this.animate( { width: "hide", paddingLeft: "hide", paddingRight: "hide", marginLeft: "hide", marginRight: "hide" }, speed, callback ); }

	function projectSlider(stop) {

		var customTimeout;
		if(stop === true) {
			customTimeout = 0;
		} else {
			customTimeout = 2000;
		}

		$('#projects-slider').gridnav
		({
			rows : 3,
			type : {
				mode    : 'sequpdown', //sequpdown //disperse
				speed   : 350,
				easing  : 'easeOutCubic',
				factor  : 50,
				reverse : false,
				timeout : customTimeout
			}
		});
	}
	$('.all a').addClass('active');
	// Init
	projectSlider();

	$('.projects-categories a').click(function(e)
	{
		var $items		   = $(this).parents('#projects-slider').find('.projects-slider-gallery li'),
			category		 = $(this).attr('data-categories'),
			$currentCategory = $(this).parent();



		if($currentCategory.hasClass('all'))
		{
			$('.projects-categories li a').removeClass('active');
			$('.all a').addClass('active');
			$items.removeClass().css({'position' : '', 'top' : '', 'left' : '', 'display' : 'block'})
								.stop(true, true).animate({opacity: 1}, 300, 'swing');
			projectSlider(true);
			return false;
		}

		$('.projects-categories li a').removeClass('active');
		$(this).addClass('active');

		$items.each(function()
		{
			var $item = $(this);
			if($item.attr('data-categories') && $item.attr('data-categories').indexOf(category) != -1)
			{
				$item.removeClass().fadeIn('slow').css({'position' :'', 'top' : '', 'left' : '', 'display' : 'block'})
								   .stop(true, true).animate({opacity: 1}, 300, 'easeOutCubic');
			}
			else
			{
				$item.addClass('hidden').animate('slow').css({'display' : 'none'})
										.stop(true, true).animate({opacity: 0}, 300, 'swing');
			}
		});

		projectSlider(true);

		e.preventDefault();
	});



	

    $("#menu li li a span").hover(function() {
        $(this).stop().animate({ marginRight: "5px" }, 200);
    },function(){
        $(this).stop().animate({ marginRight: "0px" }, 200);
	});

    $(".service_links a span").hover(function() {
        $(this).stop().animate({ marginRight: "5px" }, 200);
    },function(){
        $(this).stop().animate({ marginRight: "0px" }, 200);
	});
    $(".bdayhLink").hover(function() {
        $(this).stop().animate({ marginRight: "5px" }, 200);
    },function(){
        $(this).stop().animate({ marginRight: "0px" }, 200);
	});

    $(".bdayhLinks li").hover(function() {
        $(this).stop().animate({ marginRight: "5px" }, 200);
    },function(){
        $(this).stop().animate({ marginRight: "0px" }, 200);
	});

    $(".box_skitter").hover(function() {
        $('.prev_button').stop().show();
		$('.next_button').stop().show();
    },function(){
        $('.prev_button').stop().hide();
		$('.next_button').stop().hide();
	});

    $(".submenu").stop().hover(function() {


			$('.submenu ul').slideDown(0, function()
			{
				if(!$('.submenu ul li.vB').is(':visible'))
				{
					$('.submenu ul li.vB').show(0, function()
					{
						$('.submenu ul li.cms').show(0, function()
						{
							$('.submenu ul li.wordpress').show(0, function()
							{
								$('.submenu ul li.images').show(0, function()
								{
									$('.submenu ul li.logos').show(0, function()
									{
										$('.submenu ul li.business_cards').show(0, function()
										{
											$('.submenu ul li.business').show(0, function()
											{
												$('.submenu ul li.scripts').show(0, function()
												{
													$('.submenu ul li').css('display','block');
												});
											});
										});
									});
								});
							});
						});
					});
				}
			});

    }
	,function(){
        $('.submenu ul').hide();
		$('.submenu ul li').css('display','block');
	});


	$('.box_skitter_large').skitter(
		{animation: 'random'}
	);


	$('.gotop').click(function() {
		$('body,html').animate({scrollTop:0},500);
	});

	$(".projects-slider-gallery a").click(function(e)
	{
		//$(this).attr('target','_blank');
		//e.preventDefault();
		return false;

	})

	$('.notxt').html('');




    $(".projects-slider-gallery a").hover(function()
	{
		$('.projects-slider-gallery a div.imgOverlay').css('opacity',1);
        $(this).children('div').stop(true, true).fadeIn(700);
    },function(){
        $(this).children('div').stop(true, true).fadeOut(400);

	});

	$("#send_msg").click(function()
	{
		contactBdayh();
	})


})


